package me.gerry.locktest.monitor;

import android.content.BroadcastReceiver;
import android.content.Context;

/**
 * Created by gerry on 2018/6/24.
 */

public abstract class Monitor extends BroadcastReceiver{

    private Context context;

    public Monitor(Context context) {
        this.context = context;
    }

    public Context getContext() {
        return context;
    }

    public abstract void register();

    public void unregister() {
        getContext().unregisterReceiver(this);
    }
}
